package com.huanying.goodjob.appraise;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.huanying.framework.user.User;

@Entity
@Table(name = "label")
public class Label {
	private static final long serialVersionUID = -8714406550574846572L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private int id;//标签编号
	private String name;//标签名
	private int jobtype_id;//工种编号
	
	@ManyToOne(cascade = CascadeType.REFRESH, optional = false, fetch = FetchType.LAZY)
	@NotFound(action = NotFoundAction.IGNORE)
	@JoinColumn(name = "appraise_id",columnDefinition = "INT default 0")
    private Appraise appraiser;//所属评价
	@Column(name = "status", nullable = false, columnDefinition = "INT default 1")
	private int status;//状态：0禁用 1可用
	private int authentic_status;//身份状态：1工人 2工长
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getJobtype_id() {
		return jobtype_id;
	}
	public void setJobtype_id(int jobtype_id) {
		this.jobtype_id = jobtype_id;
	}
	public Appraise getAppraiser() {
		return appraiser;
	}
	public void setAppraiser(Appraise appraiser) {
		this.appraiser = appraiser;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public int getAuthentic_status() {
		return authentic_status;
	}
	public void setAuthentic_status(int authentic_status) {
		this.authentic_status = authentic_status;
	}
	

}
